<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数中使用 this（默认）</title>
</head>

<body>
    <h2>JavaScript <b>this</b> 关键字</h2>

    <p>实例中，<b>this</b> 表示 myFunction 函数的所有者：</p>

    <p id="demo"></p>

    <script>
        document.getElementById("demo").innerHTML = myFunction();
        function myFunction() {
            return this;
        }
    </script>
</body>

</html>